Skip to content

fix(astro): Fall back to dataCollection.userInfo for trackClientIp - #24091

Merged
s1gr1d merged 3 commits into
developfrom
sig/dc-astro-track-client-ip
Sep 7, 2026
Merged

fix(astro): Fall back to dataCollection.userInfo for trackClientIp#24091
s1gr1d merged 3 commits into
developfrom
sig/dc-astro-track-client-ip

Conversation

@s1gr1d

@s1gr1d s1gr1d commented Sep 4, 2026

Copy link
Copy Markdown
Member

handleRequest hard-defaulted trackClientIp to false, so the global dataCollection.userInfo could never switch client IP collection on. An integration option is only meant to win when the user actually sets it.

It is now options.trackClientIp ?? dataCollection.userInfo. Heads up, this changes the default. Astro apps that leave both alone start reporting user.ip_address, matching userInfo's documented default of true and what the other server SDKs do.

Fixes #24086

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 28.7 kB - -
@sentry/browser - with treeshaking flags 27.01 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 26.9 kB - -
@sentry/browser (incl. Tracing) 49.08 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 49.08 kB - -
@sentry/browser (incl. Tracing, Profiling) 52 kB - -
@sentry/browser (incl. Tracing, Replay) 88.63 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.86 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 93.31 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 106.26 kB - -
@sentry/browser (incl. Feedback) 46.19 kB - -
@sentry/browser (incl. sendFeedback) 33.76 kB - -
@sentry/browser (incl. FeedbackAsync) 38.86 kB - -
@sentry/browser (incl. Metrics) 29.67 kB - -
@sentry/browser (incl. Logs) 29.95 kB - -
@sentry/browser (incl. Metrics & Logs) 30.6 kB - -
@sentry/react 30.46 kB - -
@sentry/react (incl. Tracing) 51.29 kB - -
@sentry/vue 35.93 kB - -
@sentry/vue (incl. Tracing) 51.35 kB - -
@sentry/svelte 28.72 kB - -
CDN Bundle 30.44 kB - -
CDN Bundle (incl. Tracing) 49.61 kB - -
CDN Bundle (incl. Logs, Metrics) 32.67 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 51.54 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 73.33 kB - -
CDN Bundle (incl. Tracing, Replay) 87.17 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 89.03 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 93.1 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 95.04 kB - -
CDN Bundle - uncompressed 90.17 kB - -
CDN Bundle (incl. Tracing) - uncompressed 147.84 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 96.55 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 153.62 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 225.86 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 267.48 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 273.25 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 281.18 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 286.94 kB - -
@sentry/nextjs (client) 53.9 kB - -
@sentry/sveltekit (client) 49.52 kB - -
@sentry/core/server 38.49 kB - -
@sentry/core/browser 13.53 kB - -
@sentry/node 124.81 kB +0.02% +19 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 81.51 kB - -
@sentry/node - without tracing 88.51 kB +0.03% +22 B 🔺
@sentry/node - without channel injection 104.12 kB +0.02% +19 B 🔺
@sentry/aws-serverless 96.88 kB +0.02% +18 B 🔺
@sentry/cloudflare (withSentry) - minified 201.59 kB - -
@sentry/cloudflare (withSentry) 501.44 kB - -

View base workflow run

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@s1gr1d
s1gr1d marked this pull request as ready for review September 4, 2026 12:46
@s1gr1d
s1gr1d requested a review from a team as a code owner September 4, 2026 12:46
@s1gr1d
s1gr1d requested review from chargome and mydea and removed request for a team September 4, 2026 12:46
@s1gr1d

s1gr1d commented Sep 7, 2026

Copy link
Copy Markdown
Member Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 37bb890. Configure here.

Comment thread packages/astro/test/server/middleware.test.ts
@s1gr1d
s1gr1d requested review from a team as code owners September 7, 2026 07:58
@s1gr1d
s1gr1d requested review from isaacs and logaretm and removed request for a team September 7, 2026 07:58
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@s1gr1d
s1gr1d force-pushed the sig/dc-astro-track-client-ip branch from 3a6cdee to 794d978 Compare September 7, 2026 07:59
@s1gr1d
s1gr1d merged commit 9851d64 into develop Sep 7, 2026
48 checks passed
@s1gr1d
s1gr1d deleted the sig/dc-astro-track-client-ip branch September 7, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Astro's trackClientIp ignores dataCollection.userInfo

2 participants